package com.ldy.gen.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单表
 * </p>
 *
 * @author ldy
 * @since 2023-09-29 15:02:29
 */
@Getter
@Setter
@TableName("orders")
@ApiModel(value = "Orders对象", description = "订单表")
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("用户id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("订单名称(订单名称连接字符)，超过长度则以...结尾")
    @TableField("order_name")
    private String orderName;

    @ApiModelProperty("封面图片地址")
    @TableField("img_url")
    private String imgUrl;

    @ApiModelProperty("预支付交易会话标识，用于后续接口调用中使用，该值有效期为2小时")
    @TableField("prepay_id")
    private String prepayId;

    @ApiModelProperty("订单编号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty("收货人")
    @TableField("receiver_name")
    private String receiverName;

    @ApiModelProperty("收货电话")
    @TableField("receiver_phone")
    private String receiverPhone;

    @ApiModelProperty("收货地址")
    @TableField("receiver_address")
    private String receiverAddress;

    @ApiModelProperty("配送地址")
    @TableField("shipping_address")
    private String shippingAddress;

    @ApiModelProperty("配送地联系方式")
    @TableField("shipping_phone")
    private String shippingPhone;

    @ApiModelProperty("商品数量")
    @TableField("content_num")
    private Integer contentNum;

    @ApiModelProperty("商品销售总价")
    @TableField("total_price")
    private BigDecimal totalPrice;

    @ApiModelProperty("物流单号")
    @TableField("logistics_no")
    private String logisticsNo;

    @ApiModelProperty("支付方式：1=在线支付，2=货到付款")
    @TableField("pay_channel")
    private Boolean payChannel;

    @ApiModelProperty("订单状态: 0=待支付，1=已支付，待发货, 2=已发货/待收货，3=确认收货/已完成，4=用户关闭，5=平台关闭(商家)，6=系统调度关闭")
    @TableField("order_state")
    private Boolean orderState;

    @ApiModelProperty("支付时间")
    @TableField("pay_time")
    private LocalDateTime payTime;

    @ApiModelProperty("运费")
    @TableField("freight")
    private BigDecimal freight;

    @ApiModelProperty("是否启用，1表示启用，0表示禁用")
    @TableField("enabled")
    private Boolean enabled;

    @ApiModelProperty("数据创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("数据最后修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("数据创建者")
    @TableField("creator")
    private String creator;

    @ApiModelProperty("数据更新者")
    @TableField("updater")
    private String updater;


}
